import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store/index'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// import 'normalize.css'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
// import 'font-awesome/css/font-awesome.min.css'

import * as filters from "./filters/index"; // 全局过滤器
import './role'

// import './assets/scss/main.scss'
import "./assets/icons/iconfont.js";
import "./assets/icons/iconfont.css";

import IconSvg from "./components/common/IconSvg.vue"; // svg组件

import Mock from "./mock"

import VueParticles from 'vue-particles'
// import VCharts from 'v-charts'
import Vcomp from './components/index'

// import 'bootstrap/dist/css/bootstrap.min.css'


Vue.config.devtools = true
Vue.use(VueParticles)
// Vue.use(VCharts)
Vue.use(Vcomp)

// 启动模拟数据
let mock = true
if(mock) {
  Mock.bootstrap()
}

// 注册全局组件（register global）
Vue.component("icon-svg", IconSvg);

// 注册全局实用程序过滤器（register global utility filters）.
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key]);
});

Vue.use(ElementUI)
Vue.config.productionTip = false
NProgress.configure({ showSpinner: false });

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
